home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44b.zip / FIL001.QM < prev    next >
Text File  |  1992-06-22  |  27KB  |  549 lines

  1. *                               fil001.qm
  2. *                 Macros To Delete, Save and Edit Files
  3. *                        Written By Tom Hogshead
  4. *                       [ See FILExx.QM For Use ]
  5. *                                 6/4/92
  6. *
  7. *  Key       Subfile            Description
  8. * =====  ==============  ====================================================
  9. *  @7                    Load File Name at Cursor That is or is Not:  ( ) |chg
  10. *                           -   Enclosed with Any Single Characters
  11. *                           -   Followed by Any Single Trailing Character
  12. *  @5                    Load File Name at Cursor, No Enclosures
  13. *  @6                    Reload Current File from Disk Copy
  14. *  @8                    READ Macfile of Txtfile That is Loaded
  15. *  @2                    READ Macfile & LOAD it's Txtfile From Sorted List
  16. *  @f7                   READ Macfile & LOAD it's Txtfile From Txtfile List
  17. *  @f8                   READ Macfile From Macfile List, Txtfile Not Loaded
  18. *  @1                    LOAD File from Sorted List
  19. *  @4                    LOAD File from "Picklist", Wild Cards OK
  20. *  @3                    DELETE File from Sorted List
  21. *  @f1                   SAVE file with name "Mos_Day_Hour_Min.Ext"
  22. *  @f2                   SAVE file with name "CurrentFileName.Mos_Day"
  23. *  @f3                   SAVE Read-Only files
  24. *  @f4                   DELETE CurrentFileName backup (.bak)
  25. *  @f5                   LOAD   CurrentFileName backup (.bak)
  26. *  ^2_                   COPY CurrentFileName to Scrap/Scratch Buffers
  27. *                        Without Changing Edit Status of Current File
  28. *  ^6_                   GET Currentfilename From Scratch Buffer
  29. *                        Without Changing Edit Status of Current File
  30. *
  31. *        {e:\up\mis004}  Macros to compare files
  32. *  @f2   {e:\up\BUFF*}   Cut CurrentFileName Extension To Scrap
  33. *  @f3   {e:\up\BUFF*}   Cut CurrentFileName Extension To Scrap,
  34. *                        Adds Dot If No Extension
  35. *
  36. *        {e:\up\FILE*}   Return To FILExx.QM
  37. *
  38. *--eoi
  39.  
  40. *                            M A C R O S
  41. * ----------------------------------------------------------------------
  42. * @(1) Selects File To Load From Sorted List of Files In Directory
  43. * ----------------------------------------------------------------------
  44. @1 Macrobegin
  45.         altwordset                      * For all file names
  46.         EditFile "file.srt" return      * Load sort list
  47.         pause                           * Select sort type
  48.         copy                            * Copy line to scrap
  49.         quit                            * Quit file.srt
  50.         DOS "file-DX "                  * Make/sort file list
  51.         paste return return
  52.         EditFile "c:!" return           * Load sorted file list
  53.         cursordown insertline
  54.         cursordown                      * Get to first file name line
  55.         pause                           * Pause to select file
  56.         begline wordright               * Put cursor on file name
  57.         markword copy                   * Mark/copy file name
  58.         killfile quit                   * Kill/quit c:!
  59.         EditFile paste return           * Load file
  60.         defaultwordset                  * Reset default
  61. *
  62. * 68 bytes Sun  09-09-1990  14:38:25
  63.  
  64. * 
  65. * ----------------------------------------------------------------------
  66. * @(2) LOAD Txtfile/READ Macfile From Sorted List of Files In Directory
  67. * ----------------------------------------------------------------------
  68. @2 Macrobegin
  69.         altwordset                      * For all file names
  70.         DOS "file-DX mac d-"            * Sort macfiles by date
  71.         return return
  72.         EditFile "c:!" return           * Load sorted file list
  73.         cursordown insertline
  74.         cursordown                      * Get to first file name line
  75.         pause                           * Pause to select
  76.         begline                         * Re-position cursor if moved
  77.         find "." return return          * Select it and get to dot
  78.         CursorRight delrtword CursorLeft* Delete extension
  79.         markword copy                   * Mark/copy file name - no ext
  80.         killfile quit                   * Kill/quit c:!
  81.         EditFile paste  "qm" return     * Load txtfile
  82.         defaultwordset                  * Reset default
  83.         macroread paste "mac" return    * Read macfile
  84. *
  85. * 78 bytes Sun  09-09-1990  14:38:29
  86.  
  87. * 
  88. * ----------------------------------------------------------------------
  89. * @(3) Selects File to DELETE From Sorted List of Files In Directory
  90. * ----------------------------------------------------------------------
  91. * Be careful to select ONLY the file you want deleted.
  92.  
  93. @3 Macrobegin
  94.         altwordset                      * For all file names
  95.         EditFile "file.srt" return      * Load sort list
  96.         pause                           * Pause to select sort
  97.         markline copy paste             * Paste selected line
  98.         begline markword                * Mark file ext
  99.         quit                            * Quit file.srt
  100.         DOS "file-DX "                  * Make/sort file list
  101.         paste return return             *
  102.         EditFile "c:!" return           * Load sorted file list
  103.         cursordown insertline           *
  104.         cursordown                      * Get to first file name line
  105.         pause                           * Pause to select file
  106.         begline wordright               * Put cursor on file name
  107.         markword copy                   * Select it
  108.         insertline                      * Insert line in c:!
  109.         paste                           * Paste file name
  110.         copy                            * Copy file name to scrap
  111.         DOS "del " paste return return  * Delete select file
  112.         killfile quit                   * Kill/quit c:!
  113.         defaultwordset                  * Reset default
  114. *
  115. * 84 bytes Sun  09-09-1990  14:38:34
  116.  
  117. * 
  118. * ----------------------------------------------------------------------
  119. * @(4) Load Files From PickList
  120. * ----------------------------------------------------------------------
  121. * To run, just press Alt and 4 at the same time. At the prompt "File=",
  122. * enter a [file name(s)] and [file sort option] to make a PickList
  123. * using the following syntax:
  124. *
  125. *         [file name(s)]  [file sort option]  <enter>
  126. *
  127. * where [file sort option] is either "esda".
  128. *
  129. * For example, when entering:
  130. *
  131. *         c*.* s- (space must be included between name/sort option!)
  132. *
  133. * a file to load can be selected from a PickList of all files in
  134. * the current directory beginning with the letter "c" sorted by size,
  135. * largest first. Entering file name(s) WITHOUT a sort option, makes
  136. * a PickList sorted by name an then extension.
  137. *
  138. * This macro can sort files in any order. The following information is
  139. * from the file DX.DOC for Directory Extender. Please read this
  140. * document for more information on using the excellent program DX.
  141. *
  142. * Sorting is by name by default. The /SOrt switch without a value sorts
  143. * by name  and then extension in ascending  order. The sorting
  144. * criteria consists of: "N" for name, "E" for extension, "S" for  size,
  145. * "D" for date/time, "A" for attribute. Specifying  a letter by itself
  146. * or with a '+' suffix indicates ascending  order;  specifying a '-'
  147. * suffix indicates descending order.
  148. *
  149. * Examples of the sort options are:
  150. *
  151. *     [filename(s)] ne         => sort by name and extension
  152. *
  153. *     [filename(s)] e-n-       => sort files descending by
  154. *                                 extension first and then by
  155. *                                 descending name
  156. *
  157. *     [filename(s)] snd-       => sort files by ascending size,
  158. *                                 ascending name, and then
  159. *                                 descending date
  160. *
  161. @4 Macrobegin
  162.         unmarkblock altwordset          * For all file names
  163.         begline insertline              * Insert temp line
  164.        "File="
  165.         endline markcolumn              * Start mark
  166.         pause                           * File name?, wild cards OK
  167.         markcolumn copy                 * Mark/copy file name to scrap
  168.         delline                         * Delete temp line
  169.         DOS "PICK " paste               * Make PickList
  170.         return return
  171.         EditFile "c:!" return           * Load list
  172.         cursordown insertline
  173.         cursordown                      * Get to first file name line
  174.         pause                           * Pause to select file
  175.         begline wordright               * Put cursor on file name
  176.         markword copy                   * Mark/copy selection to scrap
  177.         killfile quit                   * Kill/quit c:!
  178.         EditFile paste return           * Load file selected
  179.         defaultwordset                  * Reset default
  180. *
  181. * 60 bytes Sun  09-09-1990  14:38:38
  182.  
  183. * 
  184. * ----------------------------------------------------------------------
  185. * @(5)  Load File Name At Cursor
  186. * ----------------------------------------------------------------------
  187. * This macro picks up a file name that is sitting at the cursor
  188. * position in the editor, and loads it into another buffer.  It is a
  189. * modification of a macro from SemWare BBS.
  190.  
  191. @5      macrobegin
  192.         altwordset
  193.         markword
  194.     jfalse END
  195.         copy editfile paste return defaultwordset
  196.     END:
  197. *
  198. * 11 bytes Sun  09-09-1990  14:38:43 (IN FILExx.QM as @5)
  199. * 14 bytes Thu  01-09-1992  08:28:51 (TH @5, added markword test)
  200.  
  201. * 
  202. * ----------------------------------------------------------------------
  203. * @(6) Reloads Current File From Disk
  204. * ----------------------------------------------------------------------
  205. @6 Macrobegin
  206.    SplitLine EditFile CurrentFileName Return NewFile "N" Return
  207. *
  208. * 12 bytes Fri  08-10-1990  15:24:13
  209.  
  210. * 
  211. * ----------------------------------------------------------------------
  212. * @(7) Load File Name At Cursor That Is or Is Not:
  213. *         -   Enclosed With Any Single Characters
  214. *         -   Followed By Any Single Trailing Character
  215. * ----------------------------------------------------------------------
  216. * This macro loads file name at cursor that is or is not enclosed with
  217. * any single characters or followed by any single trailing character,
  218. * excluding a colon:
  219.  
  220. *     a - Names enclosed with characters or followed by any single
  221. *         trailing character must have d:\path\ in name but need not
  222. *         contain an extension.
  223. *     b - Names followed by any single trailing character can NOT be
  224. *         enclosed with characters.
  225. *     c - Names not enclosed with characters need not have d:\path\ in
  226. *         name.
  227. *     d - Wild cards '* and ?' cannot be used.
  228. *     e - Use @5 if file names are NOT enclosed with characters.
  229. *     f - Qedit v2.15 is required.
  230.  
  231. * With Qconfig set to load extension '.qm' without specifying the
  232. * extension, the following are valid and invalid forms to load this
  233. * file or the nul file:
  234.  
  235. *            Valid                    Invalid
  236. *        --------------            -------------
  237. *        (e:\up\fil001.qm)
  238. *        (e:\up\fil001)             (fil001)
  239. *         e:\up\fil001
  240. *         e:\up\fil001.qm
  241. *         fil001
  242. *         fil001.qm                 (fil001.qm)
  243.  
  244. *   Load nul file ...
  245. *        (e:\up\nul)
  246. *        (e:\up\nul.)
  247. *         e:\up\nul
  248. *         e:\up\nul.
  249. *         nul                       (nul)
  250. *         nul.                      (nul.)
  251.  
  252. @7      macrobegin
  253.         setscreenoff
  254.         altwordset                          * For all file names
  255.         markword jfalse END                 * Mark name to test
  256.         editfile 'nul' return quit                                         *|
  257.         gotoblockbeg                                                       *|
  258.         copy                                * Copy name in case no enclosure
  259.         editfile return                     * Load nul                     *|
  260.         paste                               * Paste name to nul            *|
  261.         dupline                             * Duplicate name on line below *|
  262.         gotoblockbeg                        * Pos to test if enclosed
  263.         find ":" return "L" return          * Pos on first ':'
  264.         jfalse DEL                          * If no ':' assume no enclosure
  265.         cursorleft splitline cursorleft     * Move to first drive letter
  266.         isendline jtrue DEL                 * Test true if enclosed        *|
  267.         joinline delch                      * Remove lft enclosure
  268.         gotoblockend backspace              * Remove rt  enclosure
  269.         copy                                * Reposition and copy name
  270.     DEL:                                                                   *|
  271.         quit                                * Quit Nul                     *|
  272.         editfile paste return               * Load non-enclosed name
  273.         jtrue END                           * Test if load error
  274.         escape escape                       * Remove error window
  275.         editfile                            * Begin loading
  276.             endline backspace               * Remove trailing char
  277.             return                          * Finish loading
  278.     END:
  279.         defaultwordset                      * Reset
  280. *
  281. * 11 bytes Sun  09-09-1990  14:38:43 (IN FILExx.QM as @5)
  282. * 14 bytes Thu  01-09-1992  08:28:51 (TH @5, added markword test)
  283. * 55 bytes Fri  05-15-1992  11:48:17 (TH @7)
  284. * 62 bytes Thu  06-04-1992  10:15:44 (TH @7, use nul to not chg edit stat *|)
  285.  
  286. * 
  287. * ----------------------------------------------------------------------
  288. * @(8) Reads Macfile Of Txtfile That Is Loaded
  289. * ----------------------------------------------------------------------
  290. * From MACRxx.QM
  291.  
  292. @8 Macrobegin
  293.    macroread CurrentFileName backspace backspace "mac" return
  294. *
  295. * 15 bytes Sun  09-09-1990  14:38:55
  296.  
  297. * 
  298. * ----------------------------------------------------------------------
  299. * @(f1) Saves File With Name "Mos_Day_Hour_Min.Ext"
  300. * ----------------------------------------------------------------------
  301. * This macro saves the current file with the name as
  302. * "Mos_Day_Hour_Min.Ext".  For example, @f1 saves this file as
  303. * 08191025.QM when date and time are Sun 08-19-1990  10:25:00.
  304.  
  305. * Insert must be ON.
  306.  
  307. * Thanks to Jim Wright for the neat idea how to condense date and time
  308. * with his macro in QE-MEM.ZIP. Like many other macro ideas from
  309. * others, they often seem so simple once we see and understand them
  310. * that we say "why didn't I think of that" - but I didn't !
  311.  
  312. @f1    Macrobegin
  313.  *************************************** TOGGLE INSERT ON*************
  314.        insertline                      * Insert test line
  315.        "a" CursorLeft "a"              * Insert "aa"
  316.        endline                         * If not at endline-insert is on
  317.  Jtrue FIN                             * If at endline   -insert is off
  318.        toggleinsert                    * Toggle ON if off
  319.  FIN:                                  *
  320.        delline                         * Delete test line
  321.  *************************************** CONDENSE DATE & TIME *******
  322.        unmarkblock                     * Begin no marked block
  323.        insertline begline              * Insert line
  324.        insertdate inserttime           * Get date & time to condense
  325.        markline
  326.        delltword  delltword            * Delete seconds
  327.        backspace                       * Delete :
  328.        CursorLeft CursorLeft           * Keep minutes
  329.        backspace                       * Delete :
  330.        CursorLeft CursorLeft           * Keep hour
  331.        delltword  delltword            * Delete spaces and year
  332.        backspace                       * Delete -
  333.        CursorLeft CursorLeft           * Keep day
  334.        backspace                       * Delete -
  335.        CursorLeft CursorLeft           * Keep month
  336.        delltword  delltword            * Delete spaces & day name
  337.        endline                         * Go to end of condensed number
  338.        CurrentFileName                 * Get CurrentFileName
  339.        find "." return "LB" return     * Move to begin of extension
  340.        jtrue HASEXT                    * If dot found, file has extn.
  341.                                        * and go to HASEXT
  342.                                        *ELSE
  343.        Endline "." CursorLeft          * Add ".", file has NO extn.
  344.  HASEXT:                               *
  345.        unmarkblock                     * unmark line
  346.        CursorLeft markcolumn           * Move off dot and mark it
  347.        find ":" return "b" return      * Move to :
  348.        CursorLeft deleteblock          * Del all but .ext of file name
  349.        cut                             * Get number.ext to scrap
  350.        writeblock paste return         * Save number.ext
  351. *
  352. * 74 bytes Wed  02-13-1991  23:16:45
  353.  
  354. * 
  355. * ----------------------------------------------------------------------
  356. * @(f2) Saves File With Name "CurrentFileName.Mos_Day"
  357. * ----------------------------------------------------------------------
  358. * Macro saves the current file with name "CurrentFileName.Mos_Day".
  359. * For example, @f2 saves it as FILE28.214 when date and time are
  360. * Thu  02-14-1991  10:25:00. Use this macro Jan-Sept.
  361.  
  362. @f2   Macrobegin
  363.       unmarkblock                     * Begin no marked block
  364.       insertline begline              * Insert line
  365.       insertdate                      * Get date & time to condense
  366.       delltword  delltword            * Delete spaces and year
  367.       backspace                       * Delete -
  368.       CursorLeft CursorLeft           * Keep day
  369.       backspace                       * Delete -
  370.       CursorLeft                      * Keep last digit of month,
  371.       backspace                       * Delete first digit of month
  372.       backspace                       * Delete -
  373.       delltword  delltword            * Delete spaces & day name
  374.       begline
  375.       CurrentFileName                 * Get CurrentFileName
  376.       delltword                       * Delete extension
  377.       cut                             * Get file name.num to scrap
  378.       writeblock paste return         * Save file name.num
  379. *
  380. * 26 bytes Wed  10-03-1990  19:24:02
  381.  
  382. * * Macro saves the current file with name "CurrentFileName.Mos_Day".
  383. * * For example, @f2 saves it as FILE28.119 when date and time are
  384. * * Sun  10-19-1990  10:25:00. Use this macro Oct-Dec.
  385. * *
  386. * @f2   Macrobegin
  387. *       unmarkblock                     * Begin no marked block
  388. *       insertline begline              * Insert line
  389. *       insertdate                      * Get date & time to condense
  390. *       delltword  delltword            * Delete spaces and year
  391. *       backspace                       * Delete -
  392. *       CursorLeft CursorLeft           * Keep day
  393. *       backspace                       * Delete -
  394. *       backspace                       * Delete last digit of month
  395. *       CursorLeft                      * Keep first digit of month,
  396. *       delltword  delltword            * Delete spaces & day name
  397. *       begline                         *
  398. *       CurrentFileName                 * Get CurrentFileName
  399. *       delltword                       * Delete extension
  400. *       cut                             * Get file name.num to scrap
  401. *       writeblock paste return         * Save file name.num
  402. *
  403. * 25 bytes Fri  10-19-1990  12:53:19
  404.  
  405. * 
  406. * ----------------------------------------------------------------------
  407. * @(f3) Saves Read Only Files
  408. * ----------------------------------------------------------------------
  409. * This macro will save the currently loaded file if the file attribute
  410. * on the disk copy is set to Read Only.  QEdit currently will not save
  411. * files loaded as Read-Only.  Requires Dos ATTRIB.EXE.
  412.  
  413. @f3     Macrobegin
  414.         setscreenoff                            * For less flashing
  415.         insertline                              * Insert temporary line
  416.         unmarkblock markcolumn currentfilename  * Insert file name
  417.         editfile "nul" return quit              * Insure "nul" not loaded
  418.         gotoblockbeg cut                        * Cut filename to scrap
  419.         changefilename return                   * Change file name to "nul"
  420.         dos "ATTRIB -R " paste return return    * Clear Read Only attribute
  421.         changefilename paste return "y"         * Change to original file name
  422.         delline                                 * Delete temporary line
  423.         setscreenon                             * To see savefile
  424.         savefile                                * Save original file
  425. *
  426. * 80 bytes Wed  02-13-1991  16:14:00
  427. * 54 bytes Fri  04-24-1992  09:02:20 (TH @f3, shortened)
  428.  
  429. * 
  430. *--------------------------------------
  431. * #(f4) Deletes CurrentFileName Backup
  432. *--------------------------------------
  433. @f4 Macrobegin
  434.     Unmarkblock Insertline Begline      * Insert temp line with
  435.     Dropanchor CurrentFileName          * CurrentFileName marked
  436.     Find "." Return "LB" Return         * Find dot backwards
  437.     DelToEol ".bak"                     * Add .bak
  438.     Cut                                 * Cut name.bak to scrap
  439.     DOS "DEL " Paste Return Return      * Delete name.bak
  440. *   DOS "DX " Paste "//DEL"             * Alternate verify delete
  441. *   Return Return                       * with Directory Extender DX
  442. *
  443. * 40 bytes Sun  02-17-1991  14:10:19
  444. * 40 bytes Tue  05-26-1992  09:57:38 (TH @f4, changed key from #f7)
  445.  
  446. * 
  447. *----------------------------------
  448. * @(f5) Load CurrentFileName Backup
  449. *----------------------------------
  450. @f5 Macrobegin
  451.     Unmarkblock Insertline Begline      * Insert temp line with
  452.     Dropanchor CurrentFileName          * CurrentFileName marked
  453.     Find "." Return "LB" Return         * Find dot backwards
  454.     DelToEol ".bak"                     * Add .bak
  455.     Cut                                 * Cut name.bak to scrap
  456.     EditFile Paste Return               * Load name.bak
  457. *
  458. * 31 bytes Sun  02-17-1991  14:10:06
  459. * 31 bytes Tue  05-26-1992  09:56:59 (TH @f5, changed key from #f8)
  460.  
  461. * 
  462. * ----------------------------------------------------------------------
  463. * @(f7) READ macfile & LOAD it's txtfile from txtfile list
  464. * ----------------------------------------------------------------------
  465. * @f7 enables a file to be selected for editing and it's macfile read
  466. * from a prepared list of txtfiles. The list of txtfiles (-qm.lst)
  467. * included with FILE28 is a list of the latest macros in this series,
  468. * but it can be altered to meet your needs by adding [drive:]\[path\]
  469. * both in front of each file in the list and also in the second line of
  470. * the macro, and adding or deleting any files you choose to/from this
  471. * list. The modified macro can be put in your QCONFIG.DAT file and
  472. * macros can be loaded and read while in any directory. To run, press
  473. * @f7, cursor down to the desired file, and press <enter>. Remember,
  474. * txtfiles must have the extension "QM" and the macfiles must have the
  475. * extension "MAC".
  476.  
  477. @f7 Macrobegin
  478.     EditFile "-qm.lst" return           * Edit txtfile list
  479.     pause                               * Pause to select macro to read
  480.     endline                             * Go to end of file name
  481.     backspace backspace                 * and remove it's extension
  482.     copy quit                           * Copy file name to scrap
  483.     EditFile  paste "qm"  return        * Load selected macro txtfile
  484.     macroread paste "mac" return        * and read it's macfile
  485. *
  486. * 42 bytes Thu  10-18-1990  12:23:41
  487.  
  488. * 
  489. * ----------------------------------------------------------------------
  490. * @(f8) READ macfile from macfile list, txtfile not loaded
  491. * ----------------------------------------------------------------------
  492. * @f8 enables a macfile to be selected and read from a prepared list
  493. * of macfiles. The list of macfiles (-mac.lst) included with FILE28 is
  494. * a list of the latest macros in this series, but it can be altered to
  495. * meet your needs by adding [drive:]\[path\] in front of each file in
  496. * the list and also in the second line of the macro, and adding or
  497. * deleting any files you choose to/from this list. The modified macro
  498. * can be put in your QCONFIG.DAT file and macros can be read while in
  499. * any directory. To run, press @f8, cursor down to the desired file,
  500. * and press <enter>. Remember, macfiles must have the extension "MAC".
  501.  
  502. @f8 Macrobegin
  503.     EditFile "-mac.lst" return          * Edit macfile list
  504.     pause                               * Pause to select macro to read
  505.     endline                             * Go to end of macfile name
  506.     backspace backspace backspace       * and remove it's extension
  507.     copy quit                           * Copy macro name to scrap
  508.     macroread paste "mac" return        * Read it's macfile only
  509. *
  510. * 38 bytes Thu  10-18-1990  12:23:50
  511.  
  512. * 
  513. * ----------------------------------------------------------------------
  514. * ^(2_) Copy CurrentFileName to Scrap and Scratch Buffers
  515. *       Without Changing Edit Status of Current File
  516. * ----------------------------------------------------------------------
  517. * An example using this technique can be seen in @f bok001.qm.
  518.  
  519. ^2 macrobegin
  520.         findreplace #254 return                 * Initialize FindReplace
  521.             currentfilename return escape       * w/starting currentfilename
  522.         editfile "NUL" return dropanchor #254   * Insert dummy char in NUL
  523.         findreplace return return "BN" return   * Replace char w/file name
  524.         storescrbuff "n" return                 * Store file name to buff "n"
  525.         copy quit                               * Copy file name, quit nul
  526. *          (do in multiple files)
  527.         editfile paste return                   * Return to starting file
  528. *
  529. * 39 bytes Sat  10-26-1991  15:17:20 (TH ^2)
  530.  
  531. * 
  532. * ----------------------------------------------------------------------
  533. * ^(6_) Get CurrentFileName from Scratch Buffer
  534. *       Without Changing Edit Status of Current File
  535. * ----------------------------------------------------------------------
  536. * Run ^2 first.  An example using this technique can be seen in @f
  537. * bok001.qm.
  538.  
  539. ^6 macrobegin
  540.         editfile "nul" return
  541.         getscrbuff "n" return                   * Get file name from buff "n"
  542.         copy quit                               * Copy file name, quit nul
  543.         editfile paste return                   * Load starting file
  544. *
  545. * 21 bytes Sat  10-26-1991  15:17:07 (TH ^6)
  546.  
  547.  
  548.